package ru.pb.game.data.templates.players;

import gnu.trove.impl.sync.TSynchronizedIntList;
import gnu.trove.list.TIntList;
import ru.pb.game.objects.model.players.enums.RANK;
import ru.pb.global.utils.StatsSet;

public class PlayerTemplate
{
	private final TSynchronizedIntList _startEquippedWeapons;
	private final TSynchronizedIntList _startEquippedArmors;
	private final TSynchronizedIntList _startEquippedCupons;

	private final TSynchronizedIntList _startWeapons;
	private final TSynchronizedIntList _startArmors;
	private final TSynchronizedIntList _startCupons;

	private final RANK _rank;
	private final int _id, _gp, _money;

	public PlayerTemplate(StatsSet set)
	{
		_id = set.getInt("id");

		_startWeapons = set.getTIntegerList("startWeapons");
		_startArmors = set.getTIntegerList("startArmors");
		_startCupons = set.getTIntegerList("startCupons");

		_startEquippedWeapons = set.getTIntegerList("startEquippedWeapons");
		_startEquippedArmors = set.getTIntegerList("startEquippedArmors");
		_startEquippedCupons = set.getTIntegerList("startEquippedCupons");

		_rank = RANK.valueOf(set.getString("rank", "RANK_NEWBIE"));

		_gp = set.getInt("startGP", 400000);
		_money = set.getInt("startMoney", 0);
	}

	public int getGamePoint()
	{
		return _gp;
	}

	public int getMoney()
	{
		return _money;
	}

	public RANK getRank()
	{
		return _rank;
	}

	public TIntList getStartWeapons()
	{
		return _startWeapons;
	}

	public TIntList getStartArmors()
	{
		return _startArmors;
	}

	public TIntList getStartCupons()
	{
		return _startCupons;
	}

	public TIntList getStartEquippedWeapons()
	{
		return _startEquippedWeapons;
	}

	public TIntList getStartEquippedArmors()
	{
		return _startEquippedArmors;
	}

	public TIntList getStartEquippedCupons()
	{
		return _startEquippedCupons;
	}

	public int getId()
	{
		return _id;
	}
}